package com.marvels.dubbo.externalservice.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.druid.util.StringUtils;
import com.fintech.third.model.ReceiptStatusInfo;
import com.fintech.third.model.SdReceiptStatusInfo;
import com.fintech.third.model.message.SmsDefinebathSend;
import com.fintech.third.model.message.SmsSend;
import com.fintech.third.model.message.SmsTemplate;
import com.fintech.third.service.message.SmsService;
import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.dubbo.externalservice.service.SendSmsService;

import net.sf.json.JSONObject;

@Service
public class SmsServiceImpl implements SendSmsService {

	@Autowired
	private SmsService smsServiceMessage;

	@Override
	public String sendSms(JSONObject json) {
		MarvelsLogUtil.getInstance().info(">>>>>>>>>dubbo短信入参:" + JSONObject.fromObject(json));
		String jsonResult = smsServiceMessage.sendSms(json);
		if(!StringUtils.isEmpty(jsonResult)){
			MarvelsLogUtil.getInstance().info(">>>>>>>>>dubbo短信返回参数:" + JSONObject.fromObject(jsonResult));
		}else{
			MarvelsLogUtil.getInstance().info(">>>>>>>>>dubbo短信返回参数:" + jsonResult);
		}
		return jsonResult;
	}

	@Override
	public Boolean smsSendDefineTemplate(List<SmsDefinebathSend> list) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String smsSendAgagin(long smsSendFailureId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public SmsTemplate querySmsTemplateById(long templateId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String insertSmsTemplate(JSONObject json) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String removeSmsTemplate(long templateId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String updateSmsTemplate(JSONObject jsonObject) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Map<String, Object>> searchSmsTemplateInfo(JSONObject jsonObject) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Boolean insertTimingSms(List<SmsSend> list) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void updateReceiptStatus(ReceiptStatusInfo receiptStatusInfo) {
		// TODO Auto-generated method stub

	}

	@Override
	public void sdReceiptStatus(SdReceiptStatusInfo sdReceiptStatusInfo) {
		// TODO Auto-generated method stub

	}

	@Override
	public void fhReceiptStatus(String name, String report) {
		// TODO Auto-generated method stub

	}

}
